An Effect System and Language for Deterministic - by - Default Parallel Programming
نویسندگان
چکیده
This thesis presents a new, Java-based object-oriented parallel language called Deterministic Parallel Java (DPJ). DPJ uses a novel effect system to guarantee determinism by default. That means that parallel programs are guaranteed to execute deterministically unless nondeterminism is explicitly requested. This is in contrast to the shared-memory models in widespread use today, such as threads and locks (including threads in ordinary Java). Those models are inherently nondeterministic, do not provide any way to check or enforce that a computation is deterministic, and can even have unintended data races, which can lead to strange and unexpected behaviors. Because deterministic programs are much easier to reason about than arbitrary parallel code, determinism by default simplifies parallel programming. This thesis makes several broad contributions to the state of the art in programming languages and effect systems. First, it presents a comprehensive research agenda for achieving determinism by default in parallel languages with reference aliasing and shared mutable state. It argues that an object-oriented effect system is a good approach to managing shared memory conflicts. It also raises several technical challenges, many of which are taken up in the rest of the thesis. Second, this thesis presents an effect system and language for deterministic parallel programming using a fork-join model of parallel control. With simple modular checking, and with no runtime checking overhead, the effect system guarantees at compile time that there are no conflicting memory accesses between any pairs of parallel tasks. The effect system supports several important patterns of deterministic parallelism that previous systems cannot express. We describe the effect system and language both formally and informally, and prove soundness for the formal language. We also describe our evaluation showing that the language can express a range of parallel programming patterns with good performance. Third, this thesis extends the effect system and language for determinism to support a controlled form of nondeterminism. Conflicting accesses are allowed only for an explicitly identified nondeterministic parallel construct, so the language is deterministic by default. A transactional runtime provides isolation for atomic
منابع مشابه
A Language for Deterministic-by-Default Parallel Programming
When using today’s common shared-memory parallel programming models, subtle errors can lead to unintended nondeterministic behavior and bugs that appear only under certain thread interleavings. In contrast, we believe that a programming model should guarantee deterministic behavior unless the programmer specifically calls for nondeterminism. We describe our implementation of such a deterministi...
متن کاملParallel Programming Must Be Deterministic by Default
In today’s widely used parallel programming models, subtle programming errors can lead to unintended nondeterministic behavior and hard to catch bugs. In contrast, we argue for a parallel programming model that is deterministic by default: deterministic behavior is guaranteed unless the programmer explicitly uses nondeterministic constructs. This goal is particularly challenging for modern obje...
متن کاملAn Application of Genetic Network Programming Model for Pricing of Basket Default Swaps (BDS)
The credit derivatives market has experienced remarkable growth over the past decade. As such, there is a growing interest in tools for pricing of the most prominent credit derivative, the credit default swap (CDS). In this paper, we propose a heuristic algorithm for pricing of basket default swaps (BDS). For this purpose, genetic network programming (GNP), which is one of the recent evolutiona...
متن کاملEffects of Probability Function on the Performance of Stochastic Programming
Stochastic programming is a valuable optimization tool where used when some or all of the design parameters of an optimization problem are defined by stochastic variables rather than by deterministic quantities. Depending on the nature of equations involved in the problem, a stochastic optimization problem is called a stochastic linear or nonlinear programming problem. In this paper,a stochasti...
متن کاملImproving the Energy Management of Parallel Hybrid Electric Vehicle by Dynamic Programming Using Electro-Thermal Model of Battery
In this paper, an offline energy management system (EMS) is proposed for parallel hybrid electric vehicles (HEVs). The proper energy management system is necessary for dividing torque between electrical motor and Internal Combustion Engine (ICE). The battery is a crucial component of hybrid electric vehicles and affects significantly the cost and the performance of the whole vehicle. The primar...
متن کامل